function submitCreate() {
	var name = $.trim($("#name").val());
	var shortname = $.trim($("#shortname").val());
	var website = $.trim($("#website").val());
	var logo = $.trim($("#logo").val());
	var ex = $.trim($("#ex").val());
	var status = $('input:radio[name="status"]:checked').val();
	$.ajax({
		type : 'POST',
		url : "/insurer/add.json",
		dataType : "json",
		data : {
			name : name,
			shortname : shortname,
			website : website,
			logo : logo,
			ex : ex,
			status : status
		},
		success : function(data) {
			if (data && data.ok) {
				alert("添加成功！");
				window.location.reload();
			} else {
				alert(data.msg);
			}
		},
		error : function(error) {
			alert("添加失败！");
		}
	});
}

function submitModify(id) {
	var shortname = $.trim($("#shortname").val());
	var website = $.trim($("#website").val());
	var logo = $.trim($("#logo").val());
	var ex = $.trim($("#ex").val());
	var status = $('input:radio[name="status"]:checked').val();
	$.ajax({
		type : 'POST',
		url : "/insurer/modify.json",
		dataType : "json",
		data : {
			id : id,
			shortname : shortname,
			website : website,
			logo : logo,
			ex : ex,
			status : status
		},
		success : function(data) {
			if (data && data.ok)
				alert("修改成功！");
			else {
				alert(data.msg);
			}
		},
		error : function(error) {
			alert("修改失败！");
		}
	});
}